<?php
/**
 * This file is part of Hyperf Mall.
 *
 * @link     https://gitee.com/scwlkj/hyperf_mall
 * @contact  hyperf_mall@163.com
 */

namespace App\JsonRpc;

use App\Repository\AdvRepository;
use Hyperf\RpcServer\Annotation\RpcService;
use App\JsonRpc\Interfaces\AdvServiceInterface;

/**
 * @RpcService(name="Config::AdvService", protocol="jsonrpc", server="jsonrpc")
 */
class AdvService extends BaseService implements AdvServiceInterface
{
    public function init()
    {
        $this->repository = AdvRepository::getInstance();
    }

    /**
     * Notes: 返回广告位
     * Author: Bruce.z
     * DateTime: 2022/6/10 13:38
     * @return array
     */
    public function position():array
    {
        return $this->repository->position();
    }

    /**
     * Notes:app 首页 广告
     * Author: Bruce.z
     * DateTime: 2022/6/13 16:40
     * @return array
     */
    public function indexAdv():array
    {
        return $this->repository->indexAdv();
    }
}
